package com.agg.persist.xml.context;

public class EntityMapperContext {

    private static ThreadLocal<EntityContextPayload> local = new ThreadLocal() {
        protected EntityContextPayload initialValue() {
            return new EntityContextPayload();
        }
    };

    public static void set(EntityContextPayload v) {
        local.set(v);
    }

    public static EntityContextPayload get() {
        return local.get();
    }

    public static void clean() {
        if ((local == null) || (local.get() == null)) {
            return;
        }
        local.set(null);
    }

}
